package ac.svn.accesscontrol.ui.panel;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.LayoutStyle.ComponentPlacement;

import ac.svn.accesscontrol.ui.JPanel;

public class UserAccessEditorPanelI extends JPanel 
{
	public UserAccessEditorPanelI() {
		
		javax.swing.JPanel titlePanel = new javax.swing.JPanel();
		
		basePanel = new javax.swing.JPanel();
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(basePanel, GroupLayout.PREFERRED_SIZE, 516, Short.MAX_VALUE)
						.addComponent(titlePanel, GroupLayout.DEFAULT_SIZE, 516, Short.MAX_VALUE))
					.addContainerGap())
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(titlePanel, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(basePanel, GroupLayout.PREFERRED_SIZE, 371, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(87, Short.MAX_VALUE))
		);
		
		assignedSearchPanel = new javax.swing.JPanel();
		
		scrollPane = new JScrollPane();
		
		txtSearchAllLoc = new JTextField();
		txtSearchAllLoc.setText("Choose location from below list.[Click here to search]");
		txtSearchAllLoc.setColumns(10);
		
		btnNewButton = new JButton("+");
		
		scrollPane_1 = new JScrollPane();
		
		btnNewButton_1 = new JButton("New button");
		
		btnNewButton_2 = new JButton("New button");
		
		btnNewButton_3 = new JButton("New button");
		GroupLayout gl_basePanel = new GroupLayout(basePanel);
		gl_basePanel.setHorizontalGroup(
			gl_basePanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_basePanel.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_basePanel.createParallelGroup(Alignment.TRAILING)
						.addComponent(scrollPane, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
						.addComponent(assignedSearchPanel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
						.addGroup(gl_basePanel.createSequentialGroup()
							.addGroup(gl_basePanel.createParallelGroup(Alignment.TRAILING)
								.addComponent(btnNewButton_3, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
								.addComponent(btnNewButton_2, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
								.addComponent(btnNewButton_1, GroupLayout.PREFERRED_SIZE, 31, GroupLayout.PREFERRED_SIZE))
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(scrollPane_1, GroupLayout.PREFERRED_SIZE, 466, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_basePanel.createSequentialGroup()
							.addComponent(txtSearchAllLoc, GroupLayout.DEFAULT_SIZE, 456, Short.MAX_VALUE)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap())
		);
		gl_basePanel.setVerticalGroup(
			gl_basePanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_basePanel.createSequentialGroup()
					.addContainerGap()
					.addComponent(assignedSearchPanel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(scrollPane, GroupLayout.PREFERRED_SIZE, 117, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_basePanel.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnNewButton)
						.addComponent(txtSearchAllLoc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_basePanel.createParallelGroup(Alignment.LEADING)
						.addGroup(Alignment.TRAILING, gl_basePanel.createSequentialGroup()
							.addComponent(btnNewButton_1)
							.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
							.addComponent(btnNewButton_3)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(btnNewButton_2)
							.addGap(186))
						.addGroup(gl_basePanel.createSequentialGroup()
							.addComponent(scrollPane_1, GroupLayout.PREFERRED_SIZE, 171, GroupLayout.PREFERRED_SIZE)
							.addContainerGap())))
		);
		
		txtSearchAsndLoc = new JTextField();
		txtSearchAsndLoc.setText("User has access to following locations, [Click here to search]");
		txtSearchAsndLoc.setColumns(10);
		
		JCheckBox chckbxR = new JCheckBox("R");
		
		JCheckBox chckbxW = new JCheckBox("W");
		GroupLayout gl_assignedSearchPanel = new GroupLayout(assignedSearchPanel);
		gl_assignedSearchPanel.setHorizontalGroup(
			gl_assignedSearchPanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_assignedSearchPanel.createSequentialGroup()
					.addComponent(txtSearchAsndLoc, GroupLayout.PREFERRED_SIZE, 381, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(chckbxR)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(chckbxW)
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
		);
		gl_assignedSearchPanel.setVerticalGroup(
			gl_assignedSearchPanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_assignedSearchPanel.createSequentialGroup()
					.addGroup(gl_assignedSearchPanel.createParallelGroup(Alignment.BASELINE)
						.addComponent(txtSearchAsndLoc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(chckbxR)
						.addComponent(chckbxW))
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
		);
		assignedSearchPanel.setLayout(gl_assignedSearchPanel);
		basePanel.setLayout(gl_basePanel);
		
		lblUserName = new JLabel("User");
		
		lblGroups = new JLabel("Groups");
		GroupLayout gl_titlePanel = new GroupLayout(titlePanel);
		gl_titlePanel.setHorizontalGroup(
			gl_titlePanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_titlePanel.createSequentialGroup()
					.addContainerGap()
					.addComponent(lblUserName, GroupLayout.PREFERRED_SIZE, 173, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(lblGroups, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(247, Short.MAX_VALUE))
		);
		gl_titlePanel.setVerticalGroup(
			gl_titlePanel.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, gl_titlePanel.createSequentialGroup()
					.addGap(15)
					.addGroup(gl_titlePanel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblUserName)
						.addComponent(lblGroups))
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
		);
		titlePanel.setLayout(gl_titlePanel);
		setLayout(groupLayout);
	}

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private JLabel lblGroups;
    private JLabel lblUserName;
    private javax.swing.JPanel basePanel;
    private javax.swing.JPanel assignedSearchPanel;
    private JTextField txtSearchAsndLoc;
    private JScrollPane scrollPane;
    private JTextField txtSearchAllLoc;
    private JButton btnNewButton;
    private JScrollPane scrollPane_1;
    private JButton btnNewButton_1;
    private JButton btnNewButton_2;
    private JButton btnNewButton_3;
}
